package top.fengleifeng.question;

import top.fengleifeng.util.Constants;
//import top.fengleifeng.util.TreeNode;

/**
 * @author : fengleifeng
 * @Package top.fengleifeng.question
 * @Description:
 * @date Date : 2021年03月25日 4:08 下午
 */
public class Num897递增顺序查找树 {

    /**
     * Definition for a binary tree node. public class TreeNode { int val; TreeNode left; TreeNode right; TreeNode() {}
     * TreeNode(int val) { this.val = val; } TreeNode(int val, TreeNode left, TreeNode right) { this.val = val;
     * this.left = left; this.right = right; } }
     */
    class Solution {

        public TreeNode increasingBST(TreeNode root) {
            dfs(root);
            return null;
        }

        private void dfs(TreeNode root) {
            if (root != null && root.left == null && root.right == null) {
                System.out.print(root.val + ",");
            }
            dfs(root.left);
            System.out.print(root.val + ",");
            dfs(root.right);
        }
    }

    public static void main(String[] args) {
//        TreeNode listNode = Constants.treeNode;
    }
}
